package com.shopnight.utils;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.shopnight.constant.ShopIndentConstant;
import com.shopnight.entity.AllOrder;
import com.shopnight.mapper.AllOrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class AllOrderUtil {

    @Autowired
    AllOrderMapper allOrderMapper;

    public void  updateAllOrderStatus(Integer orderId,Integer status){
        //更改订单顺序表状态
        AllOrder allOrder = new AllOrder();
        allOrder.setOrderStatus(status);
        allOrderMapper.update(allOrder, new LambdaQueryWrapper<AllOrder>().eq(AllOrder::getOrderId,orderId) );
    }

}
